// HJ106.字符逆序 [入门]std::reverse
// https://www.nowcoder.com/practice/cc57022cb4194697ac30bcb566aeb47b

#include <algorithm>
#include <iostream>
#include <list>
#include <vector>
using namespace std;

int main_hj106() {
  string str;
  while (getline(cin, str)) {
    std::reverse(str.begin(), str.end());
    cout << str << endl;
  }
}
